package lm.concurrency.pattern.protectivepause;

import lm.concurrency.util.Sleeper;

/*
 并发编程设计模式：保护性暂停  join()方法的本质
 */
public class TestDemo {
    public static void main(String[] args) throws InterruptedException {
        for (int i = 0; i < 3; i++) {
            new People().start();
        }
        Sleeper.sleep(1);
        for (Integer id : Mailboxes.getIds()) {
            new Postman(id, "内容" + id).start();
        }
    }
}

